import 'package:flutter/material.dart';
import 'package:flutter_yue_joy/pages/home/home_list.dart';
import 'package:flutter_yue_joy/pages/home/home_nav.dart';

class HomePage extends StatefulWidget {
  const HomePage({Key? key}) : super(key: key);

  @override
  _IndexState createState() => _IndexState();
}

class _IndexState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: const Color.fromARGB(40, 85, 145, 175),
      appBar: AppBar(
        title: Text('社区'),
        backgroundColor: Color.fromARGB(255, 186, 211, 232),
        centerTitle: true,
      ),
      body: ListView(
        scrollDirection: Axis.vertical,
        padding: const EdgeInsets.all(8.0),
        children: [
          ClipRRect(
            borderRadius: BorderRadius.circular(10),
            child: Image.network(
              'https://tse4-mm.cn.bing.net/th/id/OIP-C.qEGCFHZU2QuTjlnaq6EUIwHaEH?w=335&h=186&c=7&r=0&o=5&dpr=1.3&pid=1.7',
              width: double.infinity,
              height: 200,
              fit: BoxFit.cover,
            ),
          ),
          HomeNav(),
          HomeList()
        ],
      ),
    );
  }
}
